from random import *

def tirage():
    p=0.75
    nb_blanches=0
    for i in range(3):
        a=random()
        if a<p:
            nb_blanches=nb_blanches+1
    return nb_blanches

def moyenne(n):
    total=0
    for i in range(n):
        total=total+tirage()
    return ...